1. Field of the Invention
The present invention relates to a computer program product, system, and method for prefetching data tracks and parity data to use for destaging updated tracks.
2. Description of the Related Art
In a Redundant Array of Independent Disk (RAID) storage system, data from a file is stored in tracks distributed across different disk drives. A stride comprises the tracks and parity data calculated from the tracks that are striped across the disk drives. A RAID controller stripes the tracks across the disks configured as RAID devices and, while writing the tracks to the disks, calculates a parity, or checksum, value that is written to one or more of the disks. The parity data may be striped or interleaved through the user data on the multiple disks. With parity, if one or more disks fail, the data on the failed disk(s) may be recovered using an algorithm that combines the parity data and the data on the surviving disks to rebuild the data on the failed disk(s).
When a storage controller receives a write to one on or more tracks in a RAID stride, the updated track is stored in a cache until a decision is made to destage the updated track to the one or more storage devices across which the stride is striped. If less than all the tracks in the stride including the updated track are maintained in cache, then the RAID controller needs to read the old tracks, other than the updated track, and old parity data in order to rewrite the entire stride including the updated track to the disks and calculate the new parity to write as the data tracks are being written. Thus, when the storage controller is ready to destage it needs to perform additional reads and cannot perform the destage operation until the required old tracks and old parity are read. The RAID controller must read the old data tracks and the old parity data, then compare the old tracks with the updated track, update the parity data, and then write the entire stride and data back to the disk drives.